home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0793july.archive
/
000059_crash!mars.let.uva.nl!wouter_Fri, 23 Jul 93 19:44:30 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
5KB
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Fri, 23 Jul 93 19:44:30 PST
Received: from mars.let.uva.nl by crash.cts.com with smtp
(Smail3.1.28.1 #15) id m0oJYeg-0000ZcC; Fri, 23 Jul 93 18:44 PDT
Received: by mars.let.uva.nl id AA01348
(5.65c/IDA-1.4.4 for amigae@bkhouse.cts.com); Sat, 24 Jul 1993 03:47:52 +0200
Return-Path: <wouter@mars.let.uva.nl>
Date: Sat, 24 Jul 1993 03:47:52 +0200
Message-Id: <199307240147.AA01348@mars.let.uva.nl>
X-Organisation: Department of Computational Linguistics,
University of Amsterdam
Spuistraat 134, 1012 VB Amsterdam, The Netherlands
From: Wouter van Oortmerssen <wouter@mars.let.uva.nl>
To: amigae@bkhouse.cts.com
Subject: Listviews and windows
>> Hi!
>>
>> I have been using E for about a month, and in that time have run into a
>> few problems (bugs? or just ignorance? :-)
judge for yourselves... :-)
>> A friend and I have been stumped on two problems:
>>
>> (1) The first one is adding nodes to a Listview from Gadtools in a loop
>> I had a project I was working on (subsequently scrapped) that needed a text
>> file to be read in line by line (ReadStr in a loop) and that line then added
>> to my listview. I was reading in the file before making the gadget. What I wa
>> doing was passing AddTail while in the loop, but for some strange reason, the
>> list view would only appear with the LAST line passed by the loop. When I
>> used addtail outside of the loop, it worked perfectly, but it would be crazy
>> to hardcode all of what I wanted directly into the program (2500+ taglines!)
It's very likely that you are using a statement of the form:
AddTail(mylist,[...data..for..new..node...])
a structure like [] is a static structure, i.e. the memory it's
in is not created at run time. because of this, every iteration
of your loop, you overwrite the previous values, and pass the
same structure to AddTail()! Instead, allocate each time a new node
New(SIZEOF ln)
and then fill it, and pass it to AddTail().
>> I would still very much like to know how to get this working, even though
>> that project has been dumped (my new QWK reader supports taglines, and so doe
>> my new Point-Mail reader)...as I will probably encounter this again.
>>
>> (2) Here is the one that is currently screwing me up: A friend and I are
>> working on an interface to E. (the "E Development System") When finished, it
>> is going to revise the source (with time and date stamp, along with
>> comments--already got most of this working) and call the text editor (perhaps
>> have a built in one(?)) and be able to run any options the user has (EPP). I
>> has a very lovely, multi-window interface, all done in gadtools. The problem
>> is getting IDCMP messages from the different windows. Right now I am using
>> a modified version of the wait4message from the examples, using
>> IDCMP_INACTIVEWINDOW to switch the window ptr being passed to wait4msg. This
>> is very clumsy (often I have to click in and out of windows before a gadget
>> passes the message). My friend is using converted C source doing it the
>> "right way" (modifying IDCMP), but I have not yet gotten this source to look
>> at, and it keeps crashing on him when he closes the windows. (We have looked
>> at everything - calling modifyidcmp w/ NIL as the arg, CloseWindowSafely, and
>> all that junk) but it is still not working for him. I cannot use this, cause
>> it would kill me haveing to wait for a reboot (not even gives a failed req!)
>> when trying out new code.
I have no clue what's crashing your machine, I'd need the code for that.
I can help you with the windows, though:
Here's how you wait for messages from various windows:
method one:
- OR the sigbits from all windows involved into a variable "allsigs"
- in a loop, perform a Wait(allsigs)
- in a loop within that one, call GetMsg() in sequence on items
of a list of ports (window.userport), until all have been processed.
you can see from intuimessage.idcmpwindow which window
actually caused the message.
method two.
if you don't want to wait for more than one port, you can CreatePort()
your own, and connect all windows you open with this one port.
you'll then receive all messages here, and can decide which it
was from like in method one. How this is done in detail is
on page 254 of the RKRM libraries 3rd ed.
>> This one is of VITAL importance. Both of these Qs are probably being
>> posted simultaneously here by my partner in crime, George Beasly. Just reply
>> to one of us...
>>
>> / / /
>> /_/_/iZ
>>
>> *-- The Gamma Quadrant --*
>>
>>
>> *-- GammaTag Version 2.8 --*
>> *-- *-- DOS ERROR: Please remove cat from drive DF0:...
miauw!
Wouter
____ Wouter van Oortmerssen, Wouter@alf.let.uva.nl
/ __/ "Einen Satz verstehen, heisst, wissen was der Fall ist,
/ __/ wenn er wahr ist" - Wittgenstein
/___/ ->subscribe to the E mailing list: amigae-request@bkhouse.cts.com<-